let turnon_time = '00 08 * * *';          // Everyday  08:00 turn on
let turnoff_time = '00 20 * * *';        // Everyday  20:00 turn off

let mydebug = require('../mydebug');
let schedule = require('node-schedule'); 
let controller = require('./controller');

let turnon_job = schedule.scheduleJob(turnon_time, turnon_function);
let turnoff_job = schedule.scheduleJob(turnoff_time, turnoff_function);



function turnon_function() {
    mydebug.LogOutput("Turn on aux light.");
    controller.Aux_light_switch(true);
}

function turnoff_function() {
    mydebug.LogOutput("Turn off aux light.");
    controller.Aux_light_switch(false);
}